package com.larly.model.enums.notes;

import lombok.Getter;

@Getter
public enum NotesIsDeletedEnum {

    NOT_DELETED(0, "未删除"),
    DELETED(1, "已删除");

    private Integer key;
    private String value;

    NotesIsDeletedEnum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public static NotesIsDeletedEnum getByKey(Integer key) {
        for (NotesIsDeletedEnum value : NotesIsDeletedEnum.values()) {
            if (value.getKey().equals(key)) {
                return value;
            }
        }
        return null;
    }
}
